<!doctype html>

<%@LANGUAGE="JScript" %>
<!--#include file ="Includes/JSON2.asp"-->
<!--#include file ="Includes/User.asp"-->
<!--#include file ="Includes/ASPHelpers.asp" namespace="Helpers"-->

<%/*--- BEGIN ASP ------------------------------------------------------------------------------------*/

	var h = Helpers;

	User.AllUsers.Remove(User.CurrentUser());
	User.CurrentUser("");
	//User.Debug("response");
    
    var historyOptions = [];
    var ListUserHistory = User.UserHistory.ToList();

    if(ListUserHistory.length > 0){
        for(var x = 0, len = ListUserHistory.length; x < len; x++){
            var curHistoryUser = new String(ListUserHistory[x]);

            historyOptions.push(
                "<option value='" + curHistoryUser + "'>" +
                    curHistoryUser +
                "</option>"
            );
        }
    }
    
    //User.Debug("response");

    var redirect = h.Req("redirect", "SearchFrameSet.asp");
    

/*--- /END ASP -----------------------------------------------------------------------------------------*/%>



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>User Login</title>
    <link href="UniversalStyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="Content/Styles/LoginScreen.css" rel="stylesheet" type="text/css" />
 
</head>

<body>

    <table width="490" border="0" align="center" cellpadding="0" cellspacing="0" id="formFrame">
    <caption class="TableTitles">Log In
    </caption>
      <tr>
        <td width="20" height="20" background="Images/TableUpperLeft.png"></td>
        <td height="20" background="Images/TableUpperMiddle.png"></td>
        <td width="20" height="20" background="Images/TableUpperRight.png"></td>
      </tr>
      
      <tr>
        <td width="20" background="Images/TableMiddleLeft.png"></td>
        <td valign="baseline" bgcolor="#FFFFFF">
            
            <form id="LogInForm" name="LogInForm" method="post" action="CheckLogIn.asp?redirect=<%= redirect %>" onSubmit="javascript: validate()">
                <label class="SearchFormText">User Name
                </label>
                <input name="UserName" type="text" id="UserName" tabindex="1" />
                <input name="BtnLogIn" type="image" width="51" height="22" id="BtnLogIn" tabindex="2" src="Images/LogInButton.png" align="absbottom" />
                <br>
                <label class="SearchFormText">User name History
                </label>
                <select id="selUserHistory" size="5">
                    <%= historyOptions.join("") %>
                </select>  
                      
            </form>
            
        </td>
        <td width="20" background="Images/TableMiddleRight.png"></td>
      </tr>
      
      <tr>
        <td width="20" height="20" background="Images/TableLowerLeft.png"></td>
        <td height="20" background="Images/TableLowerMiddle.png"></td>
        <td width="20" height="20" background="Images/TableLowerRight.png"></td>
      </tr>
    </table>
    
    

    <script type="text/javascript" src="Content/Scripts/LoginScreen.js"></script>
	<script type="text/javascript">
		top.document.getElementById("currentUser")
					.getElementsByTagName("p")[0].innerHTML = "<%= User.CurrentUser() %>";
	</script>

</body>
</html>
